package com.office.forum.manage.following.service.impl;

import java.util.List;

import com.office.forum.manage.following.domain.FollowingUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.office.forum.manage.following.mapper.ForumFollowingMapper;
import com.office.forum.manage.following.domain.ForumFollowing;
import com.office.forum.manage.following.service.IForumFollowingService;

/**
 * 用户关注表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-01
 */
@Service
public class ForumFollowingServiceImpl implements IForumFollowingService 
{
    @Autowired
    private ForumFollowingMapper forumFollowingMapper;

    /**
     * 查询用户关注表
     * 
     * @param followingId 用户关注表主键
     * @return 用户关注表
     */
    @Override
    public ForumFollowing selectForumFollowingByFollowingId(Long followingId)
    {
        return forumFollowingMapper.selectForumFollowingByFollowingId(followingId);
    }

    /**
     * 查询用户关注表列表
     * 
     * @param forumFollowing 用户关注表
     * @return 用户关注表
     */
    @Override
    public List<ForumFollowing> selectForumFollowingList(ForumFollowing forumFollowing)
    {
        return forumFollowingMapper.selectForumFollowingList(forumFollowing);
    }

    /**
     * 新增用户关注表
     * 
     * @param forumFollowing 用户关注表
     * @return 结果
     */
    @Override
    public int insertForumFollowing(ForumFollowing forumFollowing)
    {
        return forumFollowingMapper.insertForumFollowing(forumFollowing);
    }

    /**
     * 修改用户关注表
     * 
     * @param forumFollowing 用户关注表
     * @return 结果
     */
    @Override
    public int updateForumFollowing(ForumFollowing forumFollowing)
    {
        return forumFollowingMapper.updateForumFollowing(forumFollowing);
    }

    /**
     * 批量删除用户关注表
     * 
     * @param followingIds 需要删除的用户关注表主键
     * @return 结果
     */
    @Override
    public int deleteForumFollowingByFollowingIds(Long[] followingIds)
    {
        return forumFollowingMapper.deleteForumFollowingByFollowingIds(followingIds);
    }

    /**
     * 删除用户关注表信息
     * 
     * @param followingId 用户关注表主键
     * @return 结果
     */
    @Override
    public int deleteForumFollowingByFollowingId(Long followingId)
    {
        return forumFollowingMapper.deleteForumFollowingByFollowingId(followingId);
    }

    @Override
    public List<ForumFollowing> selectForumFollowedList(ForumFollowing forumFollowing) {
        return forumFollowingMapper.selectForumFollowedList(forumFollowing);
    }

    @Override
    public List<FollowingUser> selectForumFollowedUser(Long id) {
        return forumFollowingMapper.selectForumFollowedUser(id);
    }
}
